package com.funtonow.jqdk.ui;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.funtonow.jqdk.R;
import com.funtonow.jqdk.base.BaseActivity;
import com.funtonow.jqdk.utils.AppUtils;
import com.funtonow.jqdk.utils.UiUtils;

import butterknife.BindView;

/**
 * @author Airsaid
 * @date 2017/4/13
 * @desc 关于 App Activity
 */
public class AboutPageActivity extends BaseActivity {

    @BindView(R.id.txt_slogan)
    TextView mTxtSlogan;
    @BindView(R.id.txt_version)
    TextView mTxtVersion;
    @BindView(R.id.txt_content)
    TextView mTxtContent;
    @BindView(R.id.tv_about_name)
    TextView mTvAboutName;


    @Override
    public int getLayoutRes() {
        return R.layout.activity_about_page;
    }

    @Override
    public void onCreateActivity(@Nullable Bundle savedInstanceState) {
        if (AppUtils.getAppName(this).equals(getString(R.string.sqj_app_name))) {
            initToolbar(UiUtils.getString(R.string.about_sqj_app));
            mTvAboutName.setText(getResources().getString(R.string.about_sqj_app));
        }else if (AppUtils.getAppName(this).equals(getString(R.string.ssq_app_name))) {
            initToolbar(UiUtils.getString(R.string.about_ssq_app));
            mTvAboutName.setText(getResources().getString(R.string.about_ssq_app));
        }else {
            initToolbar(UiUtils.getString(R.string.about_yqs_app));
            mTvAboutName.setText(getResources().getString(R.string.about_yqs_app));
        }
        setData();
    }

    private void setData() {
        mTxtSlogan.setText(UiUtils.getString(R.string.app_name));
        mTxtVersion.setText("V".concat(AppUtils.getAppVersionName()));

    }

}
